-- GENERATED SPELL FOR [Shadowsworn Drakonid] --


function spell0_22072(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22072', 547, 1)
end

function spell1_22072(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(17547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22072', 5264, 1)
end

function spell2_22072(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(16145,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22072', 30324, 1)
end

function Sorts_22072(pUnit, Event)
local choix_sorts_22072 = math.random(0, 2)
if choix_sorts_22072 == 0 then
pUnit:RegisterEvent('spell0_22072', 1, 1)
end
if choix_sorts_22072 == 1 then
pUnit:RegisterEvent('spell1_22072', 1, 1)
end
if choix_sorts_22072 == 2 then
pUnit:RegisterEvent('spell2_22072', 1, 1)
end
end

function mob22072_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22072', math.random(1500, 3000), 1)
end

function mob22072_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22072_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22072_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22072, 1, 'mob22072_Action')
RegisterUnitEvent(22072, 2, 'mob22072_Leave')
RegisterUnitEvent(22072, 3, 'mob22072_Kill')
RegisterUnitEvent(22072, 4, 'mob22072_Die')
